package com.qfmy.webapp.mapper.wallpaper;

import com.qfmy.model.entity.wallpaper.Wallpaper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.mapper.wallpaper
 * @date 2025/11/26
 * @description 壁纸
 */
@Mapper
@SuppressWarnings("all")
public interface WallpaperMapper {

    /**
     * 获取精选壁纸
     * @return
     */
    List<Wallpaper> getJingXuanWallpapers();

    /**
     * 根据分类ID获取壁纸
     * @param categoryId
     * @param offset
     * @param pageSize
     * @return
     */
    List<Wallpaper> getWallpapersByCategoryId(Integer categoryId, int offset, Integer pageSize);

    /**
     * 根据ID获取壁纸
     * @param id
     * @return
     */
    Wallpaper getWallpaperById(Integer id);

    /**
     * 更新壁纸的评分
     * @param id
     * @param newRate
     * @param i
     */
    void updateScore(Integer id, double newRate, int i);
}
